/**
 * 
 */
package gisc.gov.vn.dev.projectX.extensions;

import gisc.gov.vn.dev.gui.GiscPanel;

import com.iver.andami.PluginServices;
import com.iver.andami.plugins.Extension;
import com.iver.andami.ui.mdiManager.IWindow;
import com.iver.cit.gvsig.project.documents.view.gui.View;

/**
 * @author HT
 *
 */
public abstract class GiscExtension extends Extension implements IGiscWindow {
	
	protected GiscPanel containPanel;

	/**
	 * 
	 */
	public GiscExtension() {
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see com.iver.andami.plugins.IExtension#initialize()
	 */
	@Override
	public void initialize() {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
	 */
	@Override
	public void execute(String actionCommand) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.iver.andami.plugins.IExtension#isEnabled()
	 */
	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}

	/* (non-Javadoc)
	 * @see com.iver.andami.plugins.IExtension#isVisible()
	 */
	@Override
	public boolean isVisible() {
		// TODO Auto-generated method stub
		IWindow v =PluginServices.getMDIManager().getActiveWindow(); 
		if (v instanceof View) {
			return true;
		}
				
		else   return false;
	}

	/* (non-Javadoc)
	 * @see gisc.gov.vn.dev.projectX.extensions.IGiscWindow#SetPanel(gisc.gov.vn.dev.gui.GiscPanel)
	 */
	@Override
	public void SetPanel(GiscPanel panel) {
		// TODO Auto-generated method stub
		this.containPanel=panel;
	}

}
